import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'colorConversion'
})
export class ColorConversion implements PipeTransform {

  transform(value: string): string {
    let reg = /^#([0-9a-fA-F]{6})$/;
    if (!reg.test(value)) {
      return "#000000"
    }
    return value;
  }
}



// WEBPACK FOOTER //
// ./src/app/utils/pipe/colorConversion.pipe.ts